#include "StdAfx.h"
#include "MP4FileCapture.hxx"


MP4FileCapture::MP4FileCapture(void)
{
	_channels = 0;
}


MP4FileCapture::~MP4FileCapture(void)
{
	
		if( _channels )
		{
			delete _channels;
			_channels = 0;
		}
	
}

void MP4FileCapture::initialize()
{
		_channels = new ChannelMp4Capture();		
		_channels->setDataCapture( this );
}

void MP4FileCapture::setChannelWnd( int channel, HWND wnd )
{
	if( _channels )
		_channels->SetDispWnd( wnd );
}

void MP4FileCapture::start()
{
	DataCapture::start();

	char szCurrentDateTime[256];     
	SYSTEMTIME systm;     
	GetLocalTime(&systm);     
	sprintf( szCurrentDateTime, "%4d%.2d%.2d%.2d%.2d%.2d",     
		systm.wYear, systm.wMonth, systm.wDay,     
		systm.wHour, systm.wMinute, systm.wSecond ); 
	
		/////////////////////////////////////////////////////////////////////////
		_channels ->CreateReadMp4Thread();
	
}

void MP4FileCapture::stop()
{
}

void MP4FileCapture::captureFrame()
{
}
